import find_image, get_hwnd;
import time;
import cv2;
import switch_line
import time;
import win32api, win32con, win32gui;
import random;

import move_action
import pick_grass

left, top, right, bottom, hwnd = get_hwnd.getRectangle()
pick = pick_grass.Picker(left, top, right, bottom, hwnd)
switchLine = switch_line.SwitchLine(left, top, right, bottom, hwnd)
while True:
    for index in range(1, 6):
        time.sleep(1);
        time.sleep(random.randrange(20, 30) / 100)
        switchLine.switch(index)
        time.sleep(1 + random.randrange(20, 30) / 100)
        pick.pick(1)
        time.sleep(random.randrange(20, 30) / 100)